package com.rran.study.designpattern.behavioral.mediator.colleague;

import lombok.Data;

/**
 * @author yy
 * @Type HourseOne.java
 * @Desc 房源B
 * @date 2020/7/23 16:38
 */
@Data
public class HourseTwo extends AbstractHourse {

    private Long price;

    public HourseTwo(Long price) {
        this.price = price;
    }
    @Override
    public void upHoursePrice(Long price) {
        this.price += price;
        this.getMediator().sendMessage(this,price);
    }

    @Override
    public void followUpPrice(Long price) {
        this.price += price;
    }
}
